package me.spring.cloud.common.components.ips.convert;

import java.io.UnsupportedEncodingException;
import lombok.Data;

@Data
public class QqwryLocation {

	public String ip;

	public String country;

	public String region;

	public String area;

	public String isp;

	@Override
	public String toString() {
		return "Location{" +
				"ip='" + ip + '\'' +
				", region='" + region + '\'' +
				", country='" + country + '\'' +
				", area='" + area + '\'' +
				", isp='" + isp + '\'' +
				'}';
	}

	public void changeEnCode() throws UnsupportedEncodingException {
		this.region = new String(this.region.trim().getBytes(),"GBK");
		this.country = new String(this.country.trim().getBytes(),"GBK");
		this.area = new String(this.area.trim().getBytes(),"GBK");
		this.isp = new String(this.isp.trim().getBytes(),"GBK");
	}
    
}

